const SocksProxyAgent = require('socks-proxy-agent');
const proxy = 'socks5://127.0.0.1:1086';
const agent = new SocksProxyAgent(proxy);

var request = require('axios');

// var url = 'https://www.baidu.com/link?url=HQESGafGzp8rQe1W8K5fqfEb4Pz6bD16c0tL_mPhxgoyHJFxaSBUEaYvnKUQGKDKD3DiRGlw6PMQlbN7__vjLXSL1JCw5ETVBmRAxu6A_Eq&wd=&eqid=b6a3a992002a708d000000065dad62cd'
var url = 'https://api.tiktokv.com/aweme/v1/play/?video_id=v070259a0000bm62h7uph42iq3s6la7g&line=0&ratio=720p&watermark=1&media_type=4&vr_type=0&improve_bitrate=0&logo_name=tiktok'

const options = {
    url,
    agentOptions: agent,
    headers: {}
};
request.get(options, (error, res, body) => {
    console.log(`Got response: ${res.statusCode}`);
    console.log(body)
})
